package com.google.code.fluentjoiner.io;

import com.google.common.base.Function;

public class FileObjectFunctions
{
    public static final Function<FileObject, String> FILEOBJECT_TO_STRING = new Function<FileObject, String>()
    {
        @Override
        public String apply(final FileObject from)
        {
            return new String(from.readContent());
        }
    };

    public static final Function<FileObject, byte[]> FILEOBJECT_TO_BYTES = new Function<FileObject, byte[]>()
    {
        @Override
        public byte[] apply(final FileObject from)
        {
            return from.readContent();
        }
    };
}